package com.kuang.swagger.controller;

import com.kuang.swagger.pojo.User;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    @PostMapping("/hello")
    public String hello(){
        return "hello";
    }
    @PostMapping("/hello1")
    public int hello1(){
        int i=5/0;
        return i;
    }
    @PostMapping("/user")
    public User getUser(){
        return new User();
    }
    @PostMapping("/lindongsong")
    public String lindongsong(@ApiParam("这个名字好酷") String username) {
        return username;
    }
}
